<template>
	<view class="wrap">
		<view class="cell">
		  <text class="label require">商品基本信息</text>
		</view>
		<view class="cell">
		  <text class="label">商品名称</text>
		  <input type="text" value="" placeholder="请输入商品名称" placeholder-class="placeholder" />
		</view>
    <view class="cell">
      <text class="label">商品主图</text>
    </view>
    <view class="pictures">
      <view class="item" v-for="(item, index) in 4">
        <image src="" mode="aspectFill"></image>
        <view class="main-img" v-if="index === 0">主图</view>
        <text class="iconfont icon-biaoqianhuashucha1"></text>
      </view>
      <text class="iconfont icon-tupiantianjia1 upload-image"></text>
    </view>
		<view class="cell">
		  <text class="label">商品描述</text>
		</view>
		<textarea value="" placeholder="请简单描述一下此商品" placeholder-class="placeholder"/>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
  page {
    background-color: #EFEFEF;
  }
.cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 28rpx;
  box-sizing: border-box;
  padding: 0 20rpx;
  margin-top: 1rpx;
  min-height: 88rpx;
  line-height: 88rpx;
  background-color: #FFFFFF;
  margin-top: 1rpx;
  
  .label {
    font-size: 28rpx;
    box-sizing: border-box;
    padding-right: 10rpx;
    &.require::before {
      content: "*";
      color: #F01919;
    }
  }
  input {
    text-align: right;
  }
  .placeholder {
    color: #888888;
  }
  .value {
    flex: 1;
  }
  .upload {
    width: 120rpx;
    height: 120rpx;
    image {
      width: 120rpx;
      height: 120rpx;
      border-radius: 10rpx;
      background-color: #EFEFEF;
    }
  }
  &.upload-cell {
    padding: 20rpx;
    justify-content: unset;
  }
}
textarea {
  width: 100%;
  height: 160rpx;
  box-sizing: border-box;
  padding: 20rpx  20rpx;
  line-height: 1.5;
  margin-top: 1rpx;
  font-size: 28rpx;
  background-color: #FFFFFF;
}
.top-line {
  margin-top: 20rpx;
}
.pictures {
  background-color: #FFFFFF;
  box-sizing: border-box;
  padding: 20rpx;
  display: flex;
  border-top: #EFEFEF 1rpx solid;
  .item {
    position: relative;
    width: 120rpx;
    height: 120rpx;
    box-sizing: border-box;
    border-radius: 5rpx;
    margin-right: 14rpx;
    image {
      background-color: #EFEFEF;
    }
    .iconfont {
      position: absolute;
      top: -14rpx;
      right: -14rpx;
      color: #E32C2C;
    }
    image {
      width: 120rpx;
      height: 120rpx;
      border-radius: 5rpx;
    }
    .main-img {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 36rpx;
      line-height: 36rpx;
      text-align: center;
      background-color: rgba($color: #000000, $alpha: 0.4);
      font-size: 24rpx;
      color: #FFFFFF;
    }
  }
  .upload-image {
    font-size: 110rpx;
    color: #EFEFEF;
  }
}
</style>
